/*登陆条件校验
* @author lovefuwp.cn 
*/
document.write("<script src=\"js/Super.js\" type=\"text/javascript\"><\/script>");

function checkvalue(id){	
	//input标签输入检查
	var login=id;	
	for (var i=0;i<login.length;i++ ){
		var title=login.elements[i].getAttribute("title");
		if(login.elements[i].value.length == "0"){				
			Super.Popup(2, "警告", "", title+"不能为空！");
			login.elements[i].focus();
			return false;
			
		}	 
	  	if (login.elements[i].value != "" && login.elements[i].type == "text"){ 
	  		if(!checkInputChar(title,login.elements[i].value)){ 	  			
		  		login.elements[i].focus(); 
		  		return false; 
	  		}
	 	}
	}	
	
	return true;	
}

/** 
* 防范SQL注入漏洞，检测输入的字符 
* 需要检测的特殊字符及字符串有：",","&","^","~","/","\\","'","%","\"" 
* @param  strInput 待检测的字符 
*/ 
function checkInputChar(title,strInput){ 
	var forbidChar = new Array(",","&","^","~","/","\\","'","%","\""); 
	for (var i = 0;i < forbidChar.length ; i++){ 
  		if(strInput.indexOf(forbidChar[i]) >= 0){  		
  			Super.Popup(2, "警告", "", title+"不能输入特殊字符！");           
      		return false; 
  		}  		
	} 
	return true; 
}